import request from '@/utils/request'

// 查询小说列表
export function listNovels(query) {
  return request({
    url: '/novel/novels/list',
    method: 'get',
    params: query
  })
}

// 查询小说详细
export function getNovels(novelId) {
  return request({
    url: '/novel/novels/' + novelId,
    method: 'get'
  })
}

// 新增小说
export function addNovels(data) {
  return request({
    url: '/novel/novels',
    method: 'post',
    data: data
  })
}

// 修改小说
export function updateNovels(data) {
  return request({
    url: '/novel/novels',
    method: 'put',
    data: data
  })
}

// 删除小说
export function delNovels(novelId) {
  return request({
    url: '/novel/novels/' + novelId,
    method: 'delete'
  })
}
